import requests
from bs4 import BeautifulSoup

def scrawler(url,selector,flag):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0'}
    r=requests.get(url,headers=headers)
    codes = r.text
    bs = BeautifulSoup(codes,'html.parser')
    if flag==0:
        return [item.text for item in bs.select(selector=selector)]
    elif flag==1:
        return [item.attrs['href'] for item in bs.select(selector=selector)]

url="http://gxbwk.njournal.sdu.edu.cn/CN/1672-3961/home.shtml"
articles = scrawler(url,"dd.biaoti > a",flag=0)
articles_urls = scrawler(url,"dd.biaoti > a",flag=1)
abstracts,pdfurl=[],[]
for url in articles_urls:
    pageurl = url
    abstracts.append(scrawler(pageurl,"#collapseOne > div > p:nth-child(1)",flag=0))
print(abstracts[0])